<!--- SHOW TIME WITH AM/PM---->

<select>
  <option>-TIME-</option>
<?php
  for($i=0 ; $i<24 ; $i++){
    $isAmPm = ($i>11)?'PM':'AM';
    $displayhrs =($i>12)?($i-12):$i;
    $optionVal = sprintf("%02d",$i);
    $optionText =($i==0)?'12': sprintf("%02d",$displayhrs);

?>
  <option value="<?=$optionVal ?>:00"><?=$optionText?>:00 <?=$isAmPm?></option>
<?php
  }//end for
 ?>
</select>
